package weibo4j;

import weibo4j.org.json.JSONObject;


public class EachOtherRelationShip {
	
	private UserRelationShipVo source;
	
	private UserRelationShipVo target;
	
	public EachOtherRelationShip(){
		
	}

	public EachOtherRelationShip(JSONObject json){
		try {
			init(json);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	private void init(JSONObject json) throws Exception {
		if(json != null){
			JSONObject sourceJson = json.getJSONObject("source");
			JSONObject targetJson = json.getJSONObject("target");
			source = new UserRelationShipVo(sourceJson);
			target = new UserRelationShipVo(targetJson);
		}
	}
	public UserRelationShipVo getSource() {
		return source;
	}

	public void setSource(UserRelationShipVo source) {
		this.source = source;
	}

	public UserRelationShipVo getTarget() {
		return target;
	}

	public void setTarget(UserRelationShipVo target) {
		this.target = target;
	}

}
